﻿namespace DatabaseManage
{
    using System;

    public class DatabaseFactory
    {
        public static AbsDatabaseInfo CreateDatabase(string dbName)
        {
            AbsDatabaseInfo info = null;
            try
            {
                info = (AbsDatabaseInfo) Activator.CreateInstance(Type.GetType("DatabaseManage." + dbName, true));
            }
            catch (TypeLoadException)
            {
                return null;
            }
            return info;
        }
    }
}

